#ifndef RECEPTION_INFOS_PROXY_H
#define RECEPTION_INFOS_PROXY_H

/////////////////////////////////////////////////////////////////  INCLUDE
//-------------------------------------------------------- Include système
//using namespace std;
// ----------------------------------------------------- Include Librairie
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/un.h>
#include <stdio.h>
#include <sys/msg.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <unistd.h>



#include <dirent.h>

//------------------------------------------------------ Include personnel
#include "utils.h"
#include "socket_utils.h"

///////////////////////////////////////////////////////////////////  PRIVE
//------------------------------------------------------------- Constantes

#define MAXLINE 4096
#define PORT_ECOUTE 10002
#define ADRESSE_BOITIER "1$127.0.0.1$5000"
#define BACKLOG 10 //nombre max de connexions en attente
#define BUF_SIZE	1024
//#define CHAINE_REFERENCEMENT_CAPTEURS_TEST "1$0001B25E$9$1$10020024$9" //TODO : supprimer à terme, remplacer par des requêtes en BDD pour trouver tous les capteurs et actionneurs


//------------------------------------------------------------------ Types
/*typedef struct
{
   SOCKET sock;
   char name[BUF_SIZE];
}Client;*/


//---------------------------------------------------- Variables statiques
int listenfd;
struct sockaddr_in servaddr;
//static char buff[MAXLINE];
time_t tics;
int premiereConnexion; // si oui 0, sinon 1
int idBalInfos;


void ReceptionInfosProxy(void* bal);


#endif
